#!/bin/bash

dbname="vis_search_engine"

mysqldump -uroot -pmysql -h127.0.0.1 --default-character-set=utf8 -tdR $dbname > routines.sql
mysqldump -uroot -pmysql -h127.0.0.1 --default-character-set=utf8 -d $dbname > vis_search_engine.sql
perl -i -pe 's/AUTO_INCREMENT=\d+ //g' vis_search_engine.sql
mysqldump -uroot -pmysql -h127.0.0.1 --default-character-set=utf8 -t $dbname sys_role site sys_user user_role type search_field_info programSyncStatus p_type channel top_keyword > data.sql
